using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace puyan_blogger {
    public partial class PloggerInputDialog : Form {
        public PloggerInputDialog() {
            InitializeComponent();
        }

        private string inputText = "";
        private bool canceled = true;

        public string InputText {
            get {
                if (!canceled) {
                    return this.inputText;
                } else {
                    return "";
                }
            }
        }

        private void inputDialogTextBox_KeyPress(object sender, KeyPressEventArgs e) {
            if (e.KeyChar.Equals('\r')) {
                canceled = false;
                this.inputText = inputDialogTextBox.Text;
                this.Close();
            }
        }
    }
}